﻿<UserControl x:Class="OI.Views.DatasetDetailsOptionsPanelView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" 
    xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    mc:Ignorable="d">
    <Grid>

        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualStateGroup.Transitions>
                    <VisualTransition/>
                </VisualStateGroup.Transitions>

                <VisualState x:Name="HighStateAF">
                    <Storyboard>
                        <ColorAnimation Duration="0" To="#FF000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="AccessFeedsPath" d:IsOptimized="True"/>
                        <ColorAnimation Duration="0" To="#FF000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="AccessFeedsPath2" d:IsOptimized="True"/>
                        <ColorAnimation Duration="0" To="#FF000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="AccessFeedsPath3" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="NormalStateAF">
                    <Storyboard>
                        <ColorAnimation Duration="0" To="#40000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="AccessFeedsPath" d:IsOptimized="True"/>
                        <ColorAnimation Duration="0" To="#40000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="AccessFeedsPath2" d:IsOptimized="True"/>
                        <ColorAnimation Duration="0" To="#40000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="AccessFeedsPath3" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
                
                
                <VisualState x:Name="HighStateDD">
                    <Storyboard>
                        <ColorAnimation Duration="0" To="#FF000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="DownloadPath" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="NormalStateDD">
                    <Storyboard>
                        <ColorAnimation Duration="0" To="#40000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="DownloadPath" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
                
                
                
                <VisualState x:Name="HighStateMU">
                    <Storyboard>
                        <ColorAnimation Duration="0" To="#FF000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="MashupPath" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="NormalStateMU">
                    <Storyboard>
                        <ColorAnimation Duration="0" To="#40000000" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" 
                                        Storyboard.TargetName="MashupPath" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
                
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <VisualStateManager.CustomVisualStateManager>
            <ei:ExtendedVisualStateManager/>
        </VisualStateManager.CustomVisualStateManager>

        <StackPanel Orientation="Horizontal">

            <StackPanel Name="AccessFeeds" Margin="0,0,16,0" Background="White"
                        Orientation="Horizontal" Micro:Message.Attach="[Event MouseLeftButtonDown] = [Action SelectAccessFeeds()]">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseEnter">
                        <ei:GoToStateAction StateName="HighStateAF"/>
                    </i:EventTrigger>
                    <i:EventTrigger EventName="MouseLeave">
                        <ei:GoToStateAction StateName="NormalStateAF"/>
                    </i:EventTrigger>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <ei:GoToStateAction StateName="NormalStateAF"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>

                <Grid Margin="0,0,2,0" Width="32" IsHitTestVisible="False">
                    <Path Name="AccessFeedsPath" Data="M 6,30 16,12 26,30" VerticalAlignment="Center"
                          Stroke="#40000000" StrokeThickness="1.5" StrokeEndLineCap="Round" Fill="Transparent"
                          StrokeLineJoin="Round"/>
                    <Ellipse Name="AccessFeedsPath2" Width="12" Height="12" Stroke="#40000000" StrokeThickness="1.5" Margin="0,-8,0,0" VerticalAlignment="Center" />
                    <Ellipse Name="AccessFeedsPath3" Width="24" Height="24" Stroke="#40000000" StrokeThickness="1.5" Margin="0,-8,0,0" VerticalAlignment="Center" />
                </Grid>

                <TextBlock Name="AccessFeedsText" Text="access feeds" IsHitTestVisible="False"
                           Style="{StaticResource PanelOptions}" 
                           VerticalAlignment="Center" />
            </StackPanel>

            <StackPanel Name="AddToMashup" Margin="0,0,16,0" Background="White"
                        Orientation="Horizontal" Micro:Message.Attach="[Event MouseLeftButtonDown] = [Action SelectAddRemItemsToMashup()]">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseEnter">
                        <ei:GoToStateAction StateName="HighStateMU"/>
                    </i:EventTrigger>
                    <i:EventTrigger EventName="MouseLeave">
                        <ei:GoToStateAction StateName="NormalStateMU"/>
                    </i:EventTrigger>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <ei:GoToStateAction StateName="NormalStateMU"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>

                <Grid VerticalAlignment="Center" Margin="0,0,2,0">
                    <Path Name="MashupPath" Data="M 0,0 32,0 32,32 0,32 0,0" IsHitTestVisible="False"
                          Stroke="#60000000" StrokeThickness="1" StrokeEndLineCap="Round" Fill="Transparent"
                          StrokeLineJoin="Round"/>
                    <TextBlock Name="MashupCountText" IsHitTestVisible="False"
                           Style="{StaticResource PanelOptions}"
                           VerticalAlignment="Center" HorizontalAlignment="Center" />
                </Grid>

                <TextBlock Name="AddToMashupText" Text="add to my map" IsHitTestVisible="False"
                           Style="{StaticResource PanelOptions}" 
                           VerticalAlignment="Center" />
            </StackPanel>

            <StackPanel Name="DownloadData" Orientation="Horizontal" Background="White"
                        Micro:Message.Attach="[Event MouseLeftButtonDown] = [Action SelectDownloadData()]">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseEnter">
                        <ei:GoToStateAction StateName="HighStateDD"/>
                    </i:EventTrigger>
                    <i:EventTrigger EventName="MouseLeave">
                        <ei:GoToStateAction StateName="NormalStateDD"/>
                    </i:EventTrigger>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <ei:GoToStateAction StateName="NormalStateDD"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>

                <Path Name="DownloadPath" Data="M 8,0 24,0 24,16 32,16 16,32 0,16 8,16 8,0"  VerticalAlignment="Center"
                      Stroke="#40000000" StrokeThickness="1.5" StrokeEndLineCap="Round" Fill="Transparent" IsHitTestVisible="False"
                      StrokeLineJoin="Round" Margin="0,0,2,0"/>

                <TextBlock Name="DownloadDataText" Text="download data" IsHitTestVisible="False"
                           Style="{StaticResource PanelOptions}" 
                           VerticalAlignment="Center" />
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
